package com.heima.user.controller.v1;

import com.heima.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserManagerDto;
import com.heima.model.user.pojos.ApUserRealname;
import com.heima.user.service.ApUserManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/api/v1/auth")
public class UserManagerController {

    @Autowired
    private ApUserManagerService apUserManagerService;

     @PostMapping("list")
    public ResponseResult<List<ApUserRealname>> list(@RequestBody UserManagerDto dto){
        return apUserManagerService.list(dto);
     }

     @PostMapping("authFail")
    public ResponseResult authFail(@RequestBody UserManagerDto dto){
         return apUserManagerService.authFail(dto);
     }

     @PostMapping("authPass")
    public ResponseResult authPass(@RequestBody UserManagerDto dto){
         return apUserManagerService.authPass(dto);
     }
}
